package org.ljy.lotterysystem.service.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;
/**
 * 活动奖品状态
 */
@Getter
@AllArgsConstructor
public enum ActivityUserStatusEnum {

    INIT(1,"人员初始化"),
    COMPLETED(2,"该人员已被抽取");

    private final Integer code;
    private final String message;

    /**
     * 字符串转成响应的枚举类型
     */
    public static ActivityUserStatusEnum forName(String name) {
        for(ActivityUserStatusEnum userIdentityEnum : ActivityUserStatusEnum.values()) {
            if(userIdentityEnum.name().equalsIgnoreCase(name)) {
                return userIdentityEnum;
            }
        }
        return null;
    }


}
